/**
 * 
 */
package com.alstudio.module.xmpp.protocol.xmpp.util.xmlcreator.iq.voip;

import com.alstudio.module.xmpp.protocol.xmpp.packact.ALXmppDomainConfig;
import com.alstudio.module.xmpp.protocol.xmpp.packact.IQNameSpace;
import com.alstudio.module.xmpp.protocol.xmpp.util.xmlcreator.AlXmlTag;
import com.alstudio.module.xmpp.protocol.xmpp.util.xmlcreator.iq.BaseIQTemplate;

/**
 * 进入爆米花
 * @author alonso lee
 *
 */
public class EnterBaomihuaIQCreator extends BaseIQTemplate {
	
	private String acceptType = "";
	
	/**
	 * 
	 */
	public EnterBaomihuaIQCreator(String acceptType,String domain) {
		// TODO Auto-generated constructor stub
		this.domain = domain;
		this.acceptType = acceptType;

	}
	
	/* (non-Javadoc)
	 * @see com.alstudio.module.xmpp.protocol.xmpp.util.xmlcreator.iq.BaseIQTemplate#getIQXml()
	 */
	@Override
	public String getIQXml() {
		// TODO Auto-generated method stub
		to = ALXmppDomainConfig.getALXmppDomainConfig().getDomainByNameSpace(
				IQNameSpace.NS_BAO_MI_HUA_ENTER);
		mALIQCreator.setTo(to + domain);
		mALIQCreator.setNs(IQNameSpace.NS_BAO_MI_HUA_ENTER);
		mALIQCreator.setType(IQ_TYPE_SET);
		AlXmlTag tag = new AlXmlTag("accept");
		tag.setText(acceptType);
		tagList.add(tag);

		String xml = "";
		try {
			xml = mALIQCreator.getXml();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return xml;
	}

}
